#include "widget.h"
#include "ui_widget.h"
#include <QVBoxLayout>
#include <QSpacerItem>
#include <QPushButton>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);


    QVBoxLayout* lay = new QVBoxLayout();
    QPushButton* btn1 = new QPushButton("按钮1");
    QPushButton* btn2 = new QPushButton("按钮2");

    QSpacerItem* spacer = new QSpacerItem(200,20);

    lay->addWidget(btn1);
    lay->addSpacerItem(spacer);
    lay->addWidget(btn2);

    this->setLayout(lay);
}

Widget::~Widget()
{
    delete ui;
}

